import java.util.Scanner;


public class Prectice3 {
    public static void numCount(String str){
        char[] arr = str.toCharArray();
        int count = 0;
        int count1 = 0;
        for (int i = 0; i < arr.length ; i++) {
            if (arr[i] >='a'&& arr[i] <='z' ||arr[i] >= 'A' && arr[i]<='Z'){
                count++;
            }else if (arr[i] >='0' || arr[i] <='9' ) {
                count1++;
            }
        }
        System.out.printf("字母有 %d 个",count);
        System.out.println();
        System.out.printf("字母有 %d 个",count1);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next() ;
        numCount(str);

    }

}

